test(linter/plugins): fix tests on Windows#15966
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
CI is currently broken, and hopefully this'll fix it, so merging without review. |
Merge activity
|
There was a problem hiding this comment.
Pull request overview
This PR fixes Windows test failures in the NAPI tests by normalizing file path slashes in test snapshots. The issue occurred because Windows uses backslashes (\) in file paths while the snapshots expected forward slashes (/), causing snapshot mismatches on Windows.
Key Changes
- Applied
normalizeSlashes()to file paths before they are used in test snapshots - Extracted
pathPrefixLenconstant for improved code clarity
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
#15911 broke NAPI tests on Windows, because it failed to replace `\` with `/` in file paths in snapshots. https://github.com/oxc-project/oxc/actions/runs/19581028169/job/56078684915#step:8:479 Fix this by normalizing slashes in file paths before outputting them in snapshots.
4d87b00 to
06f4454
Compare
oxc-project#15911 broke NAPI tests on Windows, because it failed to replace `\` with `/` in file paths in snapshots. https://github.com/oxc-project/oxc/actions/runs/19581028169/job/56078684915#step:8:479 Fix this by normalizing slashes in file paths before outputting them in snapshots.

#15911 broke NAPI tests on Windows, because it failed to replace
\with/in file paths in snapshots.https://github.com/oxc-project/oxc/actions/runs/19581028169/job/56078684915#step:8:479
Fix this by normalizing slashes in file paths before outputting them in snapshots.